﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <meta name="keywords" content="众评网，新闻资讯应用，头条，热点，科技，娱乐，健康，时尚，家居，教育，旅行，两性，美食，星座，阅读，个性化新闻">
    <meta name="description"
          content="众评网是一款高度智能的新闻资讯，通过它你可以搜索并订阅任意关键词，它会自动帮你聚合整理并更新相关资讯，同时会智能分析你的兴趣爱好，为你推荐感兴趣的内容。看新闻资讯，众评网就够了！">
    <title>众评网</title>
    {css href="/static/home/css/bootstrap.css" /}
    {css href="/static/home/css/my.css" /}
    {load href="/static/personal/layui/css/layui.css"}
    {load href="/static/personal/jietu/dist/amazeui.min.css"}
    {load href="/static/personal/css/personal.css"}
    {load href="/static/personal/css/reset.css"}
</head>
<body>
<div class="header-channel-nav header-mini ">
    <div class="content">
        <!--<a href="/" class="logo float-left iconfont icon-logo"></a>-->
        <div class="float-right header-links anim">
            {if !session('?tel')}
            <button type="button" class="tn btn-login js-to-login " data-toggle="modal" data-target="#exampleModal" id="dengru">登录
            </button>
            {else /}
            <div class="dropdown">
            <a id="dLabel" data-target="#" href="http://example.com" data-toggle="dropdown" role="button"
            aria-haspopup="true" aria-expanded="false">
            {if session('?name')}
            {:session('name')}
            {else /}
            {:session('tel')}
            {/if}
            </a>
            <ul class="dropdown-menu" aria-labelledby="dropdownMenu1" style="min-width: 1px">
            <li><a href="/personal">个人中心</a></li>
            <li><a href="/media">添加频道</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="{:url('index/Index/Log')}">退出</a></li>
            </ul>
            </div>
            {/if}
        </div>

        <div class="channel-nav">
            <nav class="navbar navbar-default" style="border: 0px;">
                <div class="navbar-header">
                    <a data-index="0" href="/index" data-channelid="best"
                       class="navbar-brand active">首页</a>
                    <a data-index="1"
                       href="/focus"
                       data-channelid="hot" class="navbar-brand ">要闻</a>
                    {if ($ass !== null)}
                    {volist name='ass' id="fl"}
                    <a data-index="1"
                       href="/focus/{$fl['cid']}"
                       data-channelid="hot" class="navbar-brand" xh="vo">{$fl['cname']}</a>
                    {/volist}
                    {/if}
                </div>
            </nav>
        </div>
    </div>
</div>

<!--main 开始-->

<div class="main">

    <div class="left-wrapper">
        <div class="profile-wrapper">
            {if ($user['icon'] == null)}
            <img src="/static/personal/img/batman.jpg" width="90">
            {else /}
            <img src="{$user['icon']}" >
            {/if}
            <p>
               {$user['nickname']}
            </p>
        </div>
        <ul class="nav-list">
            <li class="subscribe-li"><a href="/personal" class="font20">我的收藏</a></li>
            <li class="subscribe-li"><a href="/follow" class="font20">我的关注</a></li>
            <li class="subscribe-li"><a href="/discuss" class="font20">我的评论</a></li>
            <li class="subscribe-li"><a href="/message" class="font20">我的信息</a></li>
            <li class="subscribe-li"><a href="/article" class="font20">我的文章</a></li>
        </ul>
    </div>


{block name="main"}
    <!--个个栏目体  开始-->
    <div class="right-wrapper">
        <!--我的收藏-->
        <div class="nav-show" style="display:block">
            {if condition="$house == null"}
                <div style="display:block" class="no-like">
                    <img src="static/personal/img/collection.png" width="700">
                    <p>
                        暂无收藏，赶紧去看看吧
                    </p>
                </div>
            {else /}
                <ul class="like-list" >
                    {volist name="house" id="v"}
                        <li class="image">
                            <a href="" target="_blank" class="img-link">
                                <img src="/{$v['amage']}" width="100">
                            </a>
                            <div class="doc-items-wrapper">
                                <div class="doc-items mt30" >
                                    <a href="/articles/{$v['aid']}" target="_blank">
                                        <h3>{$v['aname']}</h3>
                                    </a>
                                    <p style="margin-left: 30px">
                                        <span>{$v['nickname']}</span>

                                        <span style="margin-left: 50px">{$v['regtime'] | date='y-m-d H:i:s',###}</span>
                                        <span class="like-remove">取消收藏
                                            <i data-id="{$v['id']}" >x</i>
                                        </span>
                                    </p>
                                </div>
                            </div>
                        </li>
                    {/volist}
                </ul>
            {/if}
        </div>
    </div> <!--个个栏目体 结束-->
</div>  <!--main 结束-->
{js href="/static/home/js/jquery.min.js" /}
{js href="/static/home/js/bootstrap.js" /}
{js href="/static/personal/layui/layui.js"}
<script>
    $(function () {
        $('.like-remove').bind('click', function () {
            var id = $(this).children('i').attr('data-id');
            var _this = this;
            $.ajax({
                type: 'get',
                url: 'personal/'+id,
                dateType: 'json',
                success: function (data) {
                    if (data > 0){
                        $(_this).parents('li').remove();
                    } else {
                        alert('取消收藏失败');
                    }
                },
                error: function () {
                    // AJAX执行失败
                    alert('ajax操作失败');
                }
            });
        });
    });

</script>

{/block}

<div class="footer-mini-wrapper">
    <div class="footer-mini">
        <p>
            <span class="icon-jgw"></span><span>京公网安备 11010802020163号</span><a
                target="_blank">互联网药品信息服务资格证书</a><span>京网文[2015]0377-157号</span><span>京ICP证140123号</span>
        </p>
        <p>
           <span>公司名称：众评科技有限公司</span>
        </p>
    </div>
</div>

</body>
</html>